package com.example.demo.bean;

import lombok.Data;

import javax.persistence.*;

/**
 * @author
 * @date 2020/6/25 0:13
 * @desc 用户实体
 */
@Data
@Entity
@Table(name = "t_user", uniqueConstraints = {@UniqueConstraint(columnNames="account")})//uniqueConstraints 设置唯一值字段
public class UserBean extends BaseBean {

    @Column(name = "account", length = 30)
    private String account; //用户账号

    @Column(name = "nickname", length = 30)
    private String nickname; //用户名字

    @Column(name = "spIdentity", length = 10)
    private String spIdentity; //用户身份

    @Column(name = "password", length = 30)
    private String password; //用户密码

    @Column(name = "classes", length = 10)
    private String classes;//班级

}
